<script type="text/javascript">
<!--
$(document).ready(function(){
    $('.hover').popover({
    	html: true,
    	placement: 'top'
    })
    $('.tooltip').tooltip(options)
});
//-->
</script>
<div class="content_wrapper">
    <legend>Danh sách đối tác</legend>
    <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered table-condensed" id="example" width="100%">
        <thead>
            <tr>
                <th width="30">ID</th>
                <th width="200">Tên đối tác</th>
                <th width="200">Logo</th>
                <th>Nhận xét</th>
                <th width="200">Website</th>
                <th width="70">Tùy chọn</th>
            </tr>
        </thead>
        <tbody>
            <?php  foreach($result as $key => $value) :?>
             <tr>
                <td><?php echo $value->partner_id;?></td>
                <td><?php echo $value->title;?></td>
                <td>
                <img src="<?php echo base_url('uploads/partner/').'/'.$value->partner_id.'/'.md5($value->partner_id).'.jpg'; ?>" height="100px" />
                </td>
                <td class="hover" rel="popover" data-content="<?php echo $value->comment;?>" data-original-title="<?php echo $value->title;?>"><?php echo cut_string($value->comment, 100);?></td>
                <td><?php echo $value->website; ?></td>

                <td>
                    <i title="Kích hoạt" _id_key="partner_id" _id_value="<?php echo $value->partner_id;?>" _field_key="active_flag" _field_value="<?php echo $value->active_flag;?>" _table="<?php echo TBL_PARTNER;?>" _icon_active="icon-ok" _icon_unactive="icon-ban-circle" class="btn_active <?php echo ($value->active_flag == 1) ? 'icon-ok' : 'icon-ban-circle'; ?>"></i>
                    <a href="<?php echo base_url('admin/partner/edit/'.$value->partner_id);?>"><i class="icon-edit"></i></a>
                    <a href="javascript: void(0);" _key="partner_id" _id="<?php echo $value->partner_id;?>" _table="<?php echo TBL_PARTNER?>"  class="btn_delete"><i class="icon-remove"></i></a>
                </td>
            </tr>
        <?php endforeach; ?>
            <?php if (count($result) == 0):?>
            <tr><td colspan="10">Chưa có dữ liệu đối tác</td></tr>
            <?php endif;?>
        </tbody>
    </table>
</div>
